import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import {
  Artist,
  ArtistEdition,
  Album,
  AlbumEdition,
  Song,
  ResourceFile,
  PlayList,
  Score,
  Track,
  Post,
} from './entities';
import {
  ArtistsService,
  AlbumsService,
  SongsService,
  ScoresService,
  PostsService,
  TracksService,
  PlayListsService,
} from './services';
import { UsersModule } from '../users/users.module';
import { ArtistsController } from './controllers/artists.controller';
import { AlbumsController } from './controllers/albums.controller';
import { SongsController } from './controllers/songs.controller';
import { UploadController } from './controllers/upload.controller';
import { ScoresController } from './controllers/scores.controller';
import { PostsController } from './controllers/posts.controller';
import { TracksController } from './controllers/tracks.controller';
import { PlayListsController } from './controllers/play-lists.controller';
import { SearchController } from './controllers/searrch.controller';

@Module({
  imports: [
    UsersModule,
    TypeOrmModule.forFeature([
      Artist,
      ArtistEdition,
      Album,
      AlbumEdition,
      Song,
      ResourceFile,
      PlayList,
      Score,
      Track,
      Post,
    ]),
  ],
  providers: [
    ArtistsService,
    AlbumsService,
    SongsService,
    ScoresService,
    TracksService,
    PostsService,
    PlayListsService,
  ],
  controllers: [
    ArtistsController,
    AlbumsController,
    SongsController,
    ScoresController,
    TracksController,
    PostsController,
    PlayListsController,
    UploadController,
    SearchController,
  ],
})
export class ResourcesModule {}
